package dto

import (
	"comm/selfreg"
	"core/class"
	"reflect"
)

type CommConnectInfoDto struct {
	Id int64 `json:"id,string" bson:"_id" gorm:"column:id;primaryKey;autoIncrement:false;comment:主键;"`

	Sid         string `json:"sid"                         gorm:"column:sid;size:50;comment:设备编号;"`
	RemodteAddr string `json:"remodteAddr"      validate:"max=50"   gorm:"column:remodte_addr;size:50;DEFAULT:'';not null;comment:客户端地址;"`
	Method      string `json:"method"                         gorm:"column:method;size:10;comment:连接端口;"`
	CrtDt       string `json:"crtDt"   bson:"-"     validate:""   gorm:"column:crt_dt;not null;comment:数据时间;"`

	CommPortId  int64 `json:"commPortId,string"                         gorm:"column:comm_port_id;comment:协议类型;"`
	CommProxyId int64 `json:"commProxyId,string"                         gorm:"column:comm_proxy_id;comment:代理程序;"`
}

func init() {

	var mcls = &CommConnectInfoDto{}
	var m = &class.MyClass{
		Name:     "设备上下线Dto",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  "",
		Type:     reflect.TypeOf(mcls),
	}
	selfreg.AddDto(m)
}
